home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / CDICTION / CSMARTWI.H < prev    next >
Text File  |  1989-09-15  |  2KB  |  66 lines

  1. /*****************************************************************************
  2.  
  3.     CSmartWindow:    subclass of CWindow that adds some additional features:
  4.         These are:
  5.         
  6.     Ñ    Transparent support for color. When color QD is present a color
  7.         window is automatically created. Since it calls GetNewCWindow
  8.         then it will also have a pallete if one was defined.  If none
  9.         was defined then 'pltt' 0 is loaded and SetPalette called.
  10.         
  11.     Ñ    Support for modal windows. CSmartDesktop and CSmartBartender
  12.         is also required. Call BeModal() to make a window modal and 
  13.         ReleaseMode() to cancel it.
  14.         
  15.     Ñ    Support for its own text environment (font, size, style).
  16.         This allows you to have subviews that rely on the window
  17.         to provide the desired font, rather than each subview having
  18.         to carry its own environment. The font family is initialized
  19.         by calling GetPreferredFontNum(), Which gets the preferred
  20.         font family from an (optional) 'STR ' ID 1002.
  21.  
  22.     by Dan Podwall - you may do anything you please with this code except
  23.     charge for it, with the exception of normal network download charges.
  24.  
  25. *****************************************************************************/
  26.  
  27. #define _H_CSmartWindow
  28.  
  29. #include "CWindow.h"
  30. #include "defs.h"
  31.  
  32. struct CSmartWindow : CWindow
  33. {
  34.     /* instance variables */
  35.     
  36.     struct CTextEnvirons    *itsEnvirons;
  37.     Boolean            isModal;
  38.     
  39.     /* public methods */
  40.     
  41.     virtual void ISmartWindow(Int16 WINDid, Boolean aFloating,
  42.                         CView *anEnclosure, CBureaucrat *aSupervisor,
  43.                         Boolean sizeIsMax);
  44.                     
  45.     
  46.     virtual void Prepare();
  47.     virtual void RestoreEnvirons( void);
  48.                         
  49.     virtual void SetFontNumber(Int16 aFontNumber);
  50.     virtual void SetFontName(Str255 aFontName);
  51.     virtual void SetFontStyle(Int16 aStyle);
  52.     virtual void SetFontSize(Int16 aSize);
  53.     virtual void SetTextMode(Int16 aMode);
  54.     virtual void BeModal( void);
  55.     virtual void ReleaseMode( void);
  56.     virtual Boolean IsModal( void);
  57.     
  58.     virtual void Dispose( void);
  59.     
  60.     /* private methods */
  61.     
  62.     virtual void MakeMacWindow(Int16 WINDid);
  63.     virtual void ChangeSize(Int16 width, Int16 height);
  64.  
  65.  
  66. };